Optimal. Leaf size=323 \[ \frac {(4+4 i) a^{5/2} (i A+B) \tanh ^{-1}\left (\frac {(1+i) \sqrt {a} \sqrt {\tan (c+d x)}}{\sqrt {a+i a \tan (c+d x)}}\right )}{d}-\frac {2 a^2 (14 i A+11 B) \sqrt {a+i a \tan (c+d x)}}{99 d \tan ^{\frac {9}{2}}(c+d x)}+\frac {2 a^2 (212 A-209 i B) \sqrt {a+i a \tan (c+d x)}}{693 d \tan ^{\frac {7}{2}}(c+d x)}+\frac {4 a^2 (250 i A+253 B) \sqrt {a+i a \tan (c+d x)}}{1155 d \tan ^{\frac {5}{2}}(c+d x)}-\frac {8 a^2 (655 A-649 i B) \sqrt {a+i a \tan (c+d x)}}{3465 d \tan ^{\frac {3}{2}}(c+d x)}-\frac {8 a^2 (2155 i A+2167 B) \sqrt {a+i a \tan (c+d x)}}{3465 d \sqrt {\tan (c+d x)}}-\frac {2 a A (a+i a \tan (c+d x))^{3/2}}{11 d \tan ^{\frac {11}{2}}(c+d x)} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.78, antiderivative size = 323, normalized size of antiderivative = 1.00, number of steps
used = 9, number of rules used = 5, integrand size = 38, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.132, Rules used = {3674, 3679, 12,
3625, 211} \begin {gather*} \frac {(4+4 i) a^{5/2} (B+i A) \tanh ^{-1}\left (\frac {(1+i) \sqrt {a} \sqrt {\tan (c+d x)}}{\sqrt {a+i a \tan (c+d x)}}\right )}{d}-\frac {8 a^2 (655 A-649 i B) \sqrt {a+i a \tan (c+d x)}}{3465 d \tan ^{\frac {3}{2}}(c+d x)}+\frac {4 a^2 (253 B+250 i A) \sqrt {a+i a \tan (c+d x)}}{1155 d \tan ^{\frac {5}{2}}(c+d x)}+\frac {2 a^2 (212 A-209 i B) \sqrt {a+i a \tan (c+d x)}}{693 d \tan ^{\frac {7}{2}}(c+d x)}-\frac {2 a^2 (11 B+14 i A) \sqrt {a+i a \tan (c+d x)}}{99 d \tan ^{\frac {9}{2}}(c+d x)}-\frac {8 a^2 (2167 B+2155 i A) \sqrt {a+i a \tan (c+d x)}}{3465 d \sqrt {\tan (c+d x)}}-\frac {2 a A (a+i a \tan (c+d x))^{3/2}}{11 d \tan ^{\frac {11}{2}}(c+d x)} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 211
Rule 3625
Rule 3674
Rule 3679
Rubi steps
\begin {align*} \int \frac {(a+i a \tan (c+d x))^{5/2} (A+B \tan (c+d x))}{\tan ^{\frac {13}{2}}(c+d x)} \, dx &=-\frac {2 a A (a+i a \tan (c+d x))^{3/2}}{11 d \tan ^{\frac {11}{2}}(c+d x)}+\frac {2}{11} \int \frac {(a+i a \tan (c+d x))^{3/2} \left (\frac {1}{2} a (14 i A+11 B)-\frac {1}{2} a (8 A-11 i B) \tan (c+d x)\right )}{\tan ^{\frac {11}{2}}(c+d x)} \, dx\\ &=-\frac {2 a^2 (14 i A+11 B) \sqrt {a+i a \tan (c+d x)}}{99 d \tan ^{\frac {9}{2}}(c+d x)}-\frac {2 a A (a+i a \tan (c+d x))^{3/2}}{11 d \tan ^{\frac {11}{2}}(c+d x)}+\frac {4}{99} \int \frac {\sqrt {a+i a \tan (c+d x)} \left (-\frac {1}{4} a^2 (212 A-209 i B)-\frac {1}{4} a^2 (184 i A+187 B) \tan (c+d x)\right )}{\tan ^{\frac {9}{2}}(c+d x)} \, dx\\ &=-\frac {2 a^2 (14 i A+11 B) \sqrt {a+i a \tan (c+d x)}}{99 d \tan ^{\frac {9}{2}}(c+d x)}+\frac {2 a^2 (212 A-209 i B) \sqrt {a+i a \tan (c+d x)}}{693 d \tan ^{\frac {7}{2}}(c+d x)}-\frac {2 a A (a+i a \tan (c+d x))^{3/2}}{11 d \tan ^{\frac {11}{2}}(c+d x)}+\frac {8 \int \frac {\sqrt {a+i a \tan (c+d x)} \left (-\frac {3}{4} a^3 (250 i A+253 B)+\frac {3}{4} a^3 (212 A-209 i B) \tan (c+d x)\right )}{\tan ^{\frac {7}{2}}(c+d x)} \, dx}{693 a}\\ &=-\frac {2 a^2 (14 i A+11 B) \sqrt {a+i a \tan (c+d x)}}{99 d \tan ^{\frac {9}{2}}(c+d x)}+\frac {2 a^2 (212 A-209 i B) \sqrt {a+i a \tan (c+d x)}}{693 d \tan ^{\frac {7}{2}}(c+d x)}+\frac {4 a^2 (250 i A+253 B) \sqrt {a+i a \tan (c+d x)}}{1155 d \tan ^{\frac {5}{2}}(c+d x)}-\frac {2 a A (a+i a \tan (c+d x))^{3/2}}{11 d \tan ^{\frac {11}{2}}(c+d x)}+\frac {16 \int \frac {\sqrt {a+i a \tan (c+d x)} \left (\frac {3}{4} a^4 (655 A-649 i B)+\frac {3}{2} a^4 (250 i A+253 B) \tan (c+d x)\right )}{\tan ^{\frac {5}{2}}(c+d x)} \, dx}{3465 a^2}\\ &=-\frac {2 a^2 (14 i A+11 B) \sqrt {a+i a \tan (c+d x)}}{99 d \tan ^{\frac {9}{2}}(c+d x)}+\frac {2 a^2 (212 A-209 i B) \sqrt {a+i a \tan (c+d x)}}{693 d \tan ^{\frac {7}{2}}(c+d x)}+\frac {4 a^2 (250 i A+253 B) \sqrt {a+i a \tan (c+d x)}}{1155 d \tan ^{\frac {5}{2}}(c+d x)}-\frac {8 a^2 (655 A-649 i B) \sqrt {a+i a \tan (c+d x)}}{3465 d \tan ^{\frac {3}{2}}(c+d x)}-\frac {2 a A (a+i a \tan (c+d x))^{3/2}}{11 d \tan ^{\frac {11}{2}}(c+d x)}+\frac {32 \int \frac {\sqrt {a+i a \tan (c+d x)} \left (\frac {3}{8} a^5 (2155 i A+2167 B)-\frac {3}{4} a^5 (655 A-649 i B) \tan (c+d x)\right )}{\tan ^{\frac {3}{2}}(c+d x)} \, dx}{10395 a^3}\\ &=-\frac {2 a^2 (14 i A+11 B) \sqrt {a+i a \tan (c+d x)}}{99 d \tan ^{\frac {9}{2}}(c+d x)}+\frac {2 a^2 (212 A-209 i B) \sqrt {a+i a \tan (c+d x)}}{693 d \tan ^{\frac {7}{2}}(c+d x)}+\frac {4 a^2 (250 i A+253 B) \sqrt {a+i a \tan (c+d x)}}{1155 d \tan ^{\frac {5}{2}}(c+d x)}-\frac {8 a^2 (655 A-649 i B) \sqrt {a+i a \tan (c+d x)}}{3465 d \tan ^{\frac {3}{2}}(c+d x)}-\frac {8 a^2 (2155 i A+2167 B) \sqrt {a+i a \tan (c+d x)}}{3465 d \sqrt {\tan (c+d x)}}-\frac {2 a A (a+i a \tan (c+d x))^{3/2}}{11 d \tan ^{\frac {11}{2}}(c+d x)}+\frac {64 \int -\frac {10395 a^6 (A-i B) \sqrt {a+i a \tan (c+d x)}}{16 \sqrt {\tan (c+d x)}} \, dx}{10395 a^4}\\ &=-\frac {2 a^2 (14 i A+11 B) \sqrt {a+i a \tan (c+d x)}}{99 d \tan ^{\frac {9}{2}}(c+d x)}+\frac {2 a^2 (212 A-209 i B) \sqrt {a+i a \tan (c+d x)}}{693 d \tan ^{\frac {7}{2}}(c+d x)}+\frac {4 a^2 (250 i A+253 B) \sqrt {a+i a \tan (c+d x)}}{1155 d \tan ^{\frac {5}{2}}(c+d x)}-\frac {8 a^2 (655 A-649 i B) \sqrt {a+i a \tan (c+d x)}}{3465 d \tan ^{\frac {3}{2}}(c+d x)}-\frac {8 a^2 (2155 i A+2167 B) \sqrt {a+i a \tan (c+d x)}}{3465 d \sqrt {\tan (c+d x)}}-\frac {2 a A (a+i a \tan (c+d x))^{3/2}}{11 d \tan ^{\frac {11}{2}}(c+d x)}-\left (4 a^2 (A-i B)\right ) \int \frac {\sqrt {a+i a \tan (c+d x)}}{\sqrt {\tan (c+d x)}} \, dx\\ &=-\frac {2 a^2 (14 i A+11 B) \sqrt {a+i a \tan (c+d x)}}{99 d \tan ^{\frac {9}{2}}(c+d x)}+\frac {2 a^2 (212 A-209 i B) \sqrt {a+i a \tan (c+d x)}}{693 d \tan ^{\frac {7}{2}}(c+d x)}+\frac {4 a^2 (250 i A+253 B) \sqrt {a+i a \tan (c+d x)}}{1155 d \tan ^{\frac {5}{2}}(c+d x)}-\frac {8 a^2 (655 A-649 i B) \sqrt {a+i a \tan (c+d x)}}{3465 d \tan ^{\frac {3}{2}}(c+d x)}-\frac {8 a^2 (2155 i A+2167 B) \sqrt {a+i a \tan (c+d x)}}{3465 d \sqrt {\tan (c+d x)}}-\frac {2 a A (a+i a \tan (c+d x))^{3/2}}{11 d \tan ^{\frac {11}{2}}(c+d x)}+\frac {\left (8 a^4 (i A+B)\right ) \text {Subst}\left (\int \frac {1}{-i a-2 a^2 x^2} \, dx,x,\frac {\sqrt {\tan (c+d x)}}{\sqrt {a+i a \tan (c+d x)}}\right )}{d}\\ &=\frac {(4+4 i) a^{5/2} (i A+B) \tanh ^{-1}\left (\frac {(1+i) \sqrt {a} \sqrt {\tan (c+d x)}}{\sqrt {a+i a \tan (c+d x)}}\right )}{d}-\frac {2 a^2 (14 i A+11 B) \sqrt {a+i a \tan (c+d x)}}{99 d \tan ^{\frac {9}{2}}(c+d x)}+\frac {2 a^2 (212 A-209 i B) \sqrt {a+i a \tan (c+d x)}}{693 d \tan ^{\frac {7}{2}}(c+d x)}+\frac {4 a^2 (250 i A+253 B) \sqrt {a+i a \tan (c+d x)}}{1155 d \tan ^{\frac {5}{2}}(c+d x)}-\frac {8 a^2 (655 A-649 i B) \sqrt {a+i a \tan (c+d x)}}{3465 d \tan ^{\frac {3}{2}}(c+d x)}-\frac {8 a^2 (2155 i A+2167 B) \sqrt {a+i a \tan (c+d x)}}{3465 d \sqrt {\tan (c+d x)}}-\frac {2 a A (a+i a \tan (c+d x))^{3/2}}{11 d \tan ^{\frac {11}{2}}(c+d x)}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 11.35, size = 328, normalized size = 1.02 \begin {gather*} \frac {4 \sqrt {2} a^2 (i A+B) e^{-i (c+d x)} \sqrt {-1+e^{2 i (c+d x)}} \sqrt {\frac {a e^{2 i (c+d x)}}{1+e^{2 i (c+d x)}}} \tanh ^{-1}\left (\frac {e^{i (c+d x)}}{\sqrt {-1+e^{2 i (c+d x)}}}\right )}{d \sqrt {-\frac {i \left (-1+e^{2 i (c+d x)}\right )}{1+e^{2 i (c+d x)}}}}-\frac {a^2 \csc ^3(c+d x) \sec ^2(c+d x) (66 (95 A-47 i B) \cos (c+d x)+(-5225 A+6743 i B) \cos (3 (c+d x))+3995 A \cos (5 (c+d x))-3641 i B \cos (5 (c+d x))+84810 i A \sin (c+d x)+84414 B \sin (c+d x)-42185 i A \sin (3 (c+d x))-43703 B \sin (3 (c+d x))+10925 i A \sin (5 (c+d x))+10571 B \sin (5 (c+d x))) \sqrt {a+i a \tan (c+d x)}}{27720 d \tan ^{\frac {5}{2}}(c+d x)} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Both result and optimal contain complex but leaf count of result is larger than twice
the leaf count of optimal. 975 vs. \(2 (266 ) = 532\).
time = 0.12, size = 976, normalized size = 3.02 Too large to display
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Both result and optimal contain complex but leaf count of result is larger than twice
the leaf count of optimal. 771 vs. \(2 (249) = 498\).
time = 0.54, size = 771, normalized size = 2.39 \begin {gather*} \frac {2 \, {\left (3465 \, \sqrt {2} \sqrt {-\frac {{\left (i \, A^{2} + 2 \, A B - i \, B^{2}\right )} a^{5}}{d^{2}}} {\left (d e^{\left (12 i \, d x + 12 i \, c\right )} - 6 \, d e^{\left (10 i \, d x + 10 i \, c\right )} + 15 \, d e^{\left (8 i \, d x + 8 i \, c\right )} - 20 \, d e^{\left (6 i \, d x + 6 i \, c\right )} + 15 \, d e^{\left (4 i \, d x + 4 i \, c\right )} - 6 \, d e^{\left (2 i \, d x + 2 i \, c\right )} + d\right )} \log \left (\frac {{\left (i \, \sqrt {2} \sqrt {-\frac {{\left (i \, A^{2} + 2 \, A B - i \, B^{2}\right )} a^{5}}{d^{2}}} d e^{\left (i \, d x + i \, c\right )} + \sqrt {2} {\left ({\left (-i \, A - B\right )} a^{2} e^{\left (2 i \, d x + 2 i \, c\right )} + {\left (-i \, A - B\right )} a^{2}\right )} \sqrt {\frac {a}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}} \sqrt {\frac {-i \, e^{\left (2 i \, d x + 2 i \, c\right )} + i}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}}\right )} e^{\left (-i \, d x - i \, c\right )}}{{\left (-i \, A - B\right )} a^{2}}\right ) - 3465 \, \sqrt {2} \sqrt {-\frac {{\left (i \, A^{2} + 2 \, A B - i \, B^{2}\right )} a^{5}}{d^{2}}} {\left (d e^{\left (12 i \, d x + 12 i \, c\right )} - 6 \, d e^{\left (10 i \, d x + 10 i \, c\right )} + 15 \, d e^{\left (8 i \, d x + 8 i \, c\right )} - 20 \, d e^{\left (6 i \, d x + 6 i \, c\right )} + 15 \, d e^{\left (4 i \, d x + 4 i \, c\right )} - 6 \, d e^{\left (2 i \, d x + 2 i \, c\right )} + d\right )} \log \left (\frac {{\left (-i \, \sqrt {2} \sqrt {-\frac {{\left (i \, A^{2} + 2 \, A B - i \, B^{2}\right )} a^{5}}{d^{2}}} d e^{\left (i \, d x + i \, c\right )} + \sqrt {2} {\left ({\left (-i \, A - B\right )} a^{2} e^{\left (2 i \, d x + 2 i \, c\right )} + {\left (-i \, A - B\right )} a^{2}\right )} \sqrt {\frac {a}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}} \sqrt {\frac {-i \, e^{\left (2 i \, d x + 2 i \, c\right )} + i}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}}\right )} e^{\left (-i \, d x - i \, c\right )}}{{\left (-i \, A - B\right )} a^{2}}\right ) + 2 \, \sqrt {2} {\left (2 \, {\left (3730 \, A - 3553 i \, B\right )} a^{2} e^{\left (13 i \, d x + 13 i \, c\right )} - 9 \, {\left (1805 \, A - 2013 i \, B\right )} a^{2} e^{\left (11 i \, d x + 11 i \, c\right )} + 55 \, {\left (397 \, A - 337 i \, B\right )} a^{2} e^{\left (9 i \, d x + 9 i \, c\right )} + 66 \, {\left (95 \, A - 47 i \, B\right )} a^{2} e^{\left (7 i \, d x + 7 i \, c\right )} - 1386 \, {\left (15 \, A - 16 i \, B\right )} a^{2} e^{\left (5 i \, d x + 5 i \, c\right )} + 15015 \, {\left (A - i \, B\right )} a^{2} e^{\left (3 i \, d x + 3 i \, c\right )} - 3465 \, {\left (A - i \, B\right )} a^{2} e^{\left (i \, d x + i \, c\right )}\right )} \sqrt {\frac {a}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}} \sqrt {\frac {-i \, e^{\left (2 i \, d x + 2 i \, c\right )} + i}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}}\right )}}{3465 \, {\left (d e^{\left (12 i \, d x + 12 i \, c\right )} - 6 \, d e^{\left (10 i \, d x + 10 i \, c\right )} + 15 \, d e^{\left (8 i \, d x + 8 i \, c\right )} - 20 \, d e^{\left (6 i \, d x + 6 i \, c\right )} + 15 \, d e^{\left (4 i \, d x + 4 i \, c\right )} - 6 \, d e^{\left (2 i \, d x + 2 i \, c\right )} + d\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: TypeError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.00 \begin {gather*} \int \frac {\left (A+B\,\mathrm {tan}\left (c+d\,x\right )\right )\,{\left (a+a\,\mathrm {tan}\left (c+d\,x\right )\,1{}\mathrm {i}\right )}^{5/2}}{{\mathrm {tan}\left (c+d\,x\right )}^{13/2}} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________